package com.itheima.mp.controller;


import com.itheima.mp.result.Result;
import com.itheima.mp.service.AddressService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * 地址模块
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 沙河彭于晏
 * @since 2025-03-21
 */
@Slf4j
@RestController
@RequestMapping("/address")
public class AddressController {
    @Autowired
    private AddressService addressService;

    /**
     * 逻辑删除地址
     * @param id
     * @return
     */
    @PutMapping("/logicDelete/{id}")
    public Result logicDelete(@PathVariable Integer id) {
        addressService.removeById(id);
        return Result.success();
    }

}
